using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Data.Linq;
using System.ComponentModel;

namespace MRSite.Entity  
{
    //产品规格表
     [Table(Name = "product_spec")]
    public class ProductSpec : Entity
    { 
		/// <summary>
		///
		/// </summary>
		[Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
		public override int id{ get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        [Column(Name = "shopid"), DefaultValue(0)]
        public int shopid { get; set; }


		/// <summary>
		/// 产品ID
		/// </summary>
		[Column(Name = "product_id")]
		public int product_id{ get; set; } 

		/// <summary>
		/// 规格名称
		/// </summary>
        [Column(Name = "title")]
        public String title { get; set; } 

         	/// <summary>
		/// 描述
		/// </summary>
        [Column(Name = "description")]
        public String description { get; set; } 

         
         /// <summary>
		///
		/// </summary>
        [Column(Name = "displaytype")]
        public int displaytype { get; set; } 

       /// <summary>
		/// 规格值json
		/// </summary>
        [Column(Name = "contents")]
        public String contents { get; set; } 

          /// <summary>
		/// 排序 越小越靠前
		/// </summary>
        [Column(Name = "displayorder")]
        public int displayorder { get; set; }

        /// <summary>
        ///  
        /// </summary>
        [Column(Name = "propId")]
        public String propId { get; set; }

        

		/// <summary>
        /// 
		/// </summary>
        [Column(Name = "iscycelbuy")]
        public int iscycelbuy { get; set; }


        private EntitySet<ProductSpecItem> _productSpecItemList;
        /// <summary>
        /// 商品SKU，主键
        /// </summary>
        [Association(Storage = "_productSpecItemList", ThisKey = "id", OtherKey = "specid")]
        public EntitySet<ProductSpecItem> ProductSpecItemList
        {
            get { return this._productSpecItemList; }
            set { this._productSpecItemList.Assign(value); }
        }

        public ProductSpec()
        {

            this._productSpecItemList = new EntitySet<ProductSpecItem>();
            
        }

	 } 
}    


